/** \file SolContext.cc
 * Definitions for
 *
 * (C) Copyright by Semih Cemiloglu
 * All rights reserved, see COPYRIGHT file for details.
 *
 * $Id$
 *
 *
 */

#include "SolContext.hh"
#include <stdio.h>
#include <ucontext.h>
#include "Debug.hh"


using namespace std;
using namespace TC;


int TC::PrintStack()
{
  int rv = 0;
  FILE* fs = Debug::GetSinkFile();
  
  if(fs) {
    TC_LOG_INFO("Current stack:");
    int fd = fileno(fs);
    rv = printstack(fd);
    fflush(fs);
  }
  return rv; 
}
